﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Speech.Synthesis;
using System.Text;
using System.Threading.Tasks;

namespace KM.Framework.Utility
{
   public class SpeakManager
    {
        public static void Speak(string txt)
        {
            try
            {
                using (SpeechSynthesizer synth = new SpeechSynthesizer())
                {
                    synth.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Adult);
                    synth.Speak(txt);
                }
            }
            catch (Exception ex)
            {
                return;
            }
          
        }
    }
}
